package com.tnt.hpit.services;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;

public class AtlasManager {

	static TextureAtlas atlas = null;
	static Skin skin = null;
	public static TextureAtlas getAtlas()
	{
	    if( atlas == null ) {
	    	atlas = new TextureAtlas( Gdx.files.internal( "resource-atlases/pages-info" ) );
	    }
	    return atlas;
	}
	public static Skin getSkin()
	{
	    if( skin == null ) {
	    	FileHandle skinFile = Gdx.files.internal( "skin/uiskin.json" );
            FileHandle textureFile = Gdx.files.internal( "skin/uiskin.png" );
            skin = new Skin( skinFile, textureFile );
	    }
	    return skin;
	}
	public static void newTextureAtlas(){
		atlas = new TextureAtlas( Gdx.files.internal( "resource-atlases/pages-info" ) );
	}
}